package com.yjd.bi.user.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.bi.report.enums.TimeType;
import com.yjd.bi.report.model.EChartsModel;
import com.yjd.bi.user.model.InvestUserStatisticsModel;

/**
 * <b>description</b>：用户投资分布情况统计业务接口<br>
 * <b>time</b>：2016-04-27 13:25:05 <br>
 * <b>author</b>：  zhoujin
 */
public interface IInvestUserStatisticsService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public InvestUserStatisticsModel insert(InvestUserStatisticsModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(InvestUserStatisticsModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param statistical_date
	 * @return
	 * @throws Exception
	 */
	public int delete(long statistical_date) throws Exception;

	/**
	 * 统计
	 * 
	 * @param timeType
	 * @param timeFrom
	 * @param field
	 * @return
	 * @throws Exception
	 *             EChartsModel
	 */
	public EChartsModel getDates(TimeType timeType, Long timeFrom, String field)
			throws Exception;

	/**
	 * 沉睡用户唤醒
	 * @param timeType
	 * @param timeFrom
	 * @param timeSpan
	 * @return
	 * @throws Exception
	 *             EChartsModel
	 */
	public EChartsModel getSleepUser(TimeType timeType, Long timeFrom, Integer timeSpan)
			throws Exception;
}
